<?php


ini_set("display_errors", "On");
error_reporting(E_ALL);

// 引入数据库连接文件
require_once '../../../../sql/connection.php';

$deleteID = $_POST['deleteID'];

$now = date('Y-m-d H:i:s', time());
$deleteSql = "UPDATE comment set is_delete = 1 where id = '$deleteID';";

if (mysqli_query($GLOBALS['conn'], $deleteSql)) {
	echo "
	    <script>
	        alert('删除成功！');
	        window.location.href=document.referrer;
	    </script>
	    ";
} else {
	echo "
    <script> 
        alert('删除失败！');
        history.back();
    </script>
    ";
}

